This tutorial shows how to use Default User that has
● Username: user
● Password: (randomly generated when you start Application, it is displayed in the Console)
Application Schema [Results]
Spring Boot Starters
Create Project: springboot_security_default (add Spring Boot Starters from the table)
Create Package: controllers (inside main package)
– Create Class: MyController.java (inside controllers package)
MyController.java
package com.ivoronline.springboot_security_default.controllers;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class MyController {
@ResponseBody
@RequestMapping("/Hello")
public String hello() {
return "Hello from Controller";
}
}